package com.common.server.entity.license.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.common.server.entity.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * ClassName: LicenseInfoVO
 * Package: com.common.server.entity.license.vo
 * Description:
 *
 * @Author Memory
 * @Create 2024/12/30 12:09
 * @Version 1.0
 */

/**
 * 许可证信息
 */
@Data
@ApiModel(value = "许可证信息")
public class LicenseInfoVO implements Serializable {
    /**
     * 证书序号
     */
    @ApiModelProperty(value = "证书序号", required = true)
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 证书名
     */
    @ApiModelProperty(value = "证书名", required = true)
    private String licenseName;

    /**
     * 所属项目(项目序号)
     */
    @ApiModelProperty(value = "所属项目(项目序号)", required = true)
    private long projectId;

    /**
     * 可被允许的IP地址
     */
    @ApiModelProperty(value = "可被允许的IP地址", required = true)
    private List<String> ipAddress;

    /**
     * 可被允许的 MAC 地址
     */
    @ApiModelProperty(value = "可被允许的 MAC 地址", required = true)
    private List<String> macAddress;

    /**
     * 可被允许的 CPU 序列号
     */
    @ApiModelProperty(value = "可被允许的 CPU 序列号", required = true)
    private String cpuSerial;

    /**
     * 可被允许的主板序列号
     */
    @ApiModelProperty(value = "可被允许的主板序列号", required = true)
    private String mainBoardSerial;

    /**
     * 生效时间
     */
    @ApiModelProperty(value = "生效时间", required = true)
    private Date issuedTime;

    /**
     * 失效时间
     */
    @ApiModelProperty(value = "失效时间", required = true)
    private Date expiryTime;

    /**
     * 许可期限
     */
    @ApiModelProperty(value = "许可期限(单位：天)", required = true)
    private Integer validityDays;

    /**
     * 申请人
     */
    @ApiModelProperty(value = "申请人", required = true)
    private String applicantName;

    /**
     * 证书状态(0-生效中，1-已过期，2-已撤销)
     */
    @ApiModelProperty(value = "证书状态(0-生效中，1-已过期，2-已撤销)", required = true)
    private Integer status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
